package com.nlp.trie.viterbi;

import java.util.HashMap;

public class SymbolTable {
	HashMap<String, Symbol> table;
	public SymbolTable() {
		table = new HashMap<String, Symbol>();
	}
	
	public Symbol intern(String s) {
		s = s.toLowerCase();
		Symbol sym = table.get(s);
		if (sym == null) {
			sym = new Symbol(s);
			table.put(s, sym);
		}
		return sym;
	}
	

}
